package com.example.user.service;

import com.example.user.entity.User;
import com.example.user.entity.repository.UserRepository;
import com.example.user.exception.NotFoundException;
import com.example.user.model.response.UserResponse;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

@Service
@AllArgsConstructor
public class UserService {
    private UserRepository userRepository;

    /**
     *
     * @param id
     * @return
     */
    public UserResponse findById(Long id) {
        User user = userRepository.findById(id).orElseThrow(() -> new NotFoundException("用户信息不存在。"));
        return null;
    }
}
